home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 …ember: Reference Library / Dev.CD Dec 00 RL Disk 1.toast / pc / technical documentation / develop / develop issue 26 / develop issue 26 code / truffles - display mgr. / sprocket / interfaces / utilityclasses.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-01  |  615 b   |  34 lines

  1. #ifndef        _SPROCKET_UTILITYCLASSES_
  2. #define        _SPROCKET_UTILITYCLASSES_
  3.  
  4. #ifndef        __QUICKDRAW__
  5. #include    <Quickdraw.h>
  6. #endif
  7.  
  8. //    TGraphicsContext to handle saving and restoring the QuickDraw
  9. //    (and eventually QuickDraw GX) drawing environment.
  10.  
  11. class    TGraphicsContext
  12.     {
  13. public:
  14.                 TGraphicsContext(GrafPtr aPort);
  15.                 ~TGraphicsContext();
  16. private:
  17.     GrafPtr        fOldPort;
  18.     PenState    fOldPenState;
  19.     RgnHandle    fOldClip;
  20.     };
  21.  
  22.  
  23. //    TExlusiveSection class to simplfy dealing with critical sections
  24. //    in multi-threaded code.
  25.  
  26. class    TExclusiveSection
  27.     {
  28. public:
  29.                 TExclusiveSection();
  30.                 ~TExclusiveSection();
  31.     };
  32.  
  33. #endif
  34.